window = this;
// require('jsencrypt')
import { JSEncrypt } from 'jsencrypt'


/**
 * 对content进行RSA加密
 * @param {*}} content
 */
content = '\x97E@\x8a\xb4\xb5\xab\x02\x83\x96\x03\xae\x94\xa1\xfa]\x81W\x13\x119s\xf0\x02\xee\xc5\xe00\xbf\xf5\x07\x0eL\xefA\xdcC\xdcv\x8d\xde\r\xa4\xb47\x89{\xa7\x9cvV\xa490\x1c\x049\x14\xfb\x85\xf1\x89}\nl"\n\xa4\xe5\x12\xfa\xf2v\xa1\xecW\xc1\x97+^?\xa7\x86\xc0\xbc\xb5\xa4\x03\x13*\xb8\x14\xca\x08\x07\xa6\xc6\x00XqV\xb6\x99K\x8fd\x1d!\xc9\xb5el\x9d)\xdb\xcc\x08\xb3Z\xb5g5\x9e`\x83\x11\xe7#';
  let encryptor = new JSEncrypt() // 创建加密对象实例
  // 公钥
  let pubKey = '-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDHVjye0xpTWC7fPhPYcXfe3dr3\nIy3ltqUOpAy5D9cO9eTAe+vqdjEULO4/hyzWLM5OiV1u1mWJhuTSG425I7q+x6/A\nqMUTuE8QF4QYPCWFgOswfaHyVYlISePtlPiTaYpXh5XWLa5WPZPlR8YyfRHLU/++\nX7WDmw0hINL2AeECUQIDAQAB\n-----END PUBLIC KEY-----'
 
  encryptor.setPublicKey(pubKey) // 设置公钥
 
  print(encryptor.encrypt(content)) // 对内容进行加密, 可以在此打印下密文串